<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateAdvertsTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('adverts', function(Blueprint $table)
		{
			$table->increments('id');
			$table->integer('customer_id')->default(0)->comment('客户id');
			$table->boolean('advert_type_id')->default(0)->comment('广告类型 1 图片 2 视频 ');
			$table->string('name')->comment('广告名称');
			$table->text('content_key', 65535)->comment('广告内容，前端直传的boskey');
			$table->integer('play_second')->unsigned()->default(30)->comment('播放(时长)秒数');
			$table->timestamps();
		});
	}


	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('adverts');
	}

}
